// JavaScript Document
define(function (require, exports, module) {
	var LayoutController=function(selector){
		this.element=$(selector).get(0)
		this.element=top.document.body
		this.init();
	};
	LayoutController.prototype.init=function(){
		var self=this;
		this.asideSwitch=$("#switchDiv").get(0)
		$(this.asideSwitch).bind("click",function(event){self.asideSwitchClickHandle(event)});
		if($(top.document).find(".switchDiv")){
			$(top.document).find(".switchDiv").bind("click",function(event){self.asideSwitchClickHandle(event)});
		}


	}
	LayoutController.prototype.type="leftAside"
	LayoutController.prototype.aisdeStatus="open"
	LayoutController.prototype.asideSwitchClickHandle=function(){
		this.switchAside();
	}
	LayoutController.prototype.switchAside=function(){
		if(this.aisdeStatus=="open"){
			this.aisdeStatus="close"
		}else{
			this.aisdeStatus="open"
			$("#asideSwitch").attr("title","收起左侧菜单");
		}
		this.update();
	}
	LayoutController.prototype.update=function(){
		$(this.element).removeClass("asideClose")
		if(this.aisdeStatus=="close"){
			$(this.element).addClass("asideClose")
			$("#asideSwitch").attr("title","展开左侧菜单");
		}
	}
	
	var AsideSwitch=function(){
		
	}
	
	module.exports = LayoutController;
})